ADD_DEFINITIONS(-DOSGDB_LIBRARY)

#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET(LIB_NAME comLib)
SET(TARGET_H
    global.h
)

aux_source_directory(. SRC_DIR)
include_directories(../include ../ThirdParty/ffmpeg-20181201-1a89ae1-win32-dev/include)
link_directories(../public_lib
../ThirdParty/ffmpeg-20181201-1a89ae1-win32-dev/lib)

file(GLOB_RECURSE FIND_RET *.h)
file(GLOB EXTERN_FILE ../include/comLib/*.h)

add_definitions(-DEXPORT_API)

ADD_LIBRARY(${LIB_NAME} SHARED
            ${FIND_RET}
            ${EXTERN_FILE}
            ${SRC_DIR}
        )

SET(LIBRARY_OUTPUT_PATH ../../bin)
#/SAFESEH:NO
target_link_libraries(${LIB_NAME} avutil avcodec swscale avformat avdevice)